package com.model;

import java.io.Serializable;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

@Entity
@Table(name="tb_staff")
public class StaffBean implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = 8359572343021669274L;
	@Id
	@GenericGenerator(name = "idGenerator", strategy = "uuid")
	@GeneratedValue(generator = "idGenerator")
	/**
	 * id
	 */
	private String id;
	private String staff_number;
	private String staff_name;
	private String staff_sex;
	private String staff_eb;//学历
	private String staff_phone;
	private String staff_address;
	private String staff_post;
	private String staff_id_card;
	private String staff_hire;//录用时间
	private String staff_date_birth;
	@Column(columnDefinition="number(10,2)")
	private Double staff_salary;//薪水
	private Boolean is_turnover; //离职 是否离职
	private String turnover_time; //离职时间
	
	@ManyToOne(cascade=CascadeType.ALL,fetch=FetchType.EAGER)
    @JoinColumn(name="dept_id")//加入一列作为外键
	private DeptBean dept_id;

	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getStaff_number() {
		return staff_number;
	}
	public void setStaff_number(String staff_number) {
		this.staff_number = staff_number;
	}
	public String getStaff_name() {
		return staff_name;
	}
	public void setStaff_name(String staff_name) {
		this.staff_name = staff_name;
	}
	public String getStaff_sex() {
		return staff_sex;
	}
	public void setStaff_sex(String staff_sex) {
		this.staff_sex = staff_sex;
	}
	public String getStaff_eb() {
		return staff_eb;
	}
	public void setStaff_eb(String staff_eb) {
		this.staff_eb = staff_eb;
	}
	public String getStaff_phone() {
		return staff_phone;
	}
	public void setStaff_phone(String staff_phone) {
		this.staff_phone = staff_phone;
	}
	public String getStaff_address() {
		return staff_address;
	}
	public void setStaff_address(String staff_address) {
		this.staff_address = staff_address;
	}
	public String getStaff_post() {
		return staff_post;
	}
	public void setStaff_post(String staff_post) {
		this.staff_post = staff_post;
	}
	public String getStaff_id_card() {
		return staff_id_card;
	}
	public void setStaff_id_card(String staff_id_card) {
		this.staff_id_card = staff_id_card;
	}
	public Double getStaff_salary() {
		return staff_salary;
	}
	public void setStaff_salary(Double staff_salary) {
		this.staff_salary = staff_salary;
	}
	public Boolean getIs_turnover() {
		return is_turnover;
	}
	public void setIs_turnover(Boolean is_turnover) {
		this.is_turnover = is_turnover;
	}
	public DeptBean getDept_id() {
		return dept_id;
	}
	public void setDept_id(DeptBean dept_id) {
		this.dept_id = dept_id;
	}
	public String getStaff_hire() {
		return staff_hire;
	}
	public void setStaff_hire(String staff_hire) {
		this.staff_hire = staff_hire;
	}
	public String getStaff_date_birth() {
		return staff_date_birth;
	}
	public void setStaff_date_birth(String staff_date_birth) {
		this.staff_date_birth = staff_date_birth;
	}
	public String getTurnover_time() {
		return turnover_time;
	}
	public void setTurnover_time(String turnover_time) {
		this.turnover_time = turnover_time;
	}
	
	
	public static void main(String[] args) {
		System.out.println(Math.floor(Math.random()*10000));
//		double i=3.141592651238545612344;
//		System.out.println(i*1000);
//		BigDecimal bigNumber = new BigDecimal("3.141592651238545612344");
	}
}

